package com.sunwayhorizo.health.business.registries.employee.query;

import java.util.List;

import javax.ejb.Local;

import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.rim.Employee;
import com.sunwayhorizo.health.hl7.rim.Role;

@Local
public interface EmployeeQueryLocal
{

    /**
     * 根据科室ID或者姓名查询所有的员工
     * 
     * @Title: findEmployeeByDept
     * @param currentPage
     *            当前页
     * @param pageSize
     *            每页显示的记录数
     * @param name
     *            员工名称
     * @param departmentId
     *            科室ID
     * @return ResultsDTO 返回类型
     * @firstAuthor jinzw
     * @firstTime 2010-12-27下午01:51:17
     * @lastAuthor jinzw
     * @lastTime 2010-12-27下午10:51:17
     */
    public List<Role> findEmpByDeptIdAndPage(int currentPage, int pageSize, String name, String departmentId) throws Hl7Exception;


    /**
     * 根据工作组ID或者姓名查询所有的员工
     * 
     * @Title: findEmployeeByCond
     * @param currentPage
     *            当前页
     * @param pageSize
     *            每页显示的记录数
     * @param name
     *            员工名称
     * @param workGroupId
     *            工作组ID
     * @return ResultsDTO 返回类型
     * @firstAuthor jinzw
     * @firstTime 2010-12-27下午01:51:17
     * @lastAuthor jinzw
     * @lastTime 2010-12-27下午10:51:17
     */
    public List<Role> findEmployeeByWorkGroup(int currentPage, int pageSize, String name, String workGroupId) throws Hl7Exception;


    /**
     * 员工分页统计数
     * 
     * @param name
     * @param departmentId
     * @param workGroupId
     * @return
     * @throws Hl7Exception
     */
    public int findEmployeeCount(String name, String departmentId, String workGroupId) throws Hl7Exception;


    /**
     * 根据科室，职务/职称查询员工集合
     * 
     * @param departmentId
     * @param dicCode
     * @return
     * @throws Hl7Exception
     */
    public List findEmpByDeptOrDicCode(String departmentId, String dicCode) throws Hl7Exception;


    /**
     * 根据角色ID，员工唯一标示，科室ID查询员工集合
     * 
     * @Title: findEmployeeDetail
     * @param roleId
     *            角色id
     * @param empId
     *            员工唯一标识
     * @param departmentId
     *            科室ID
     * @return List<Role> 员工角色集合
     * @firstAuthor jinzw
     * @firstTime 2010-12-27下午01:51:17
     * @lastAuthor jinzw
     * @lastTime 2010-12-27下午10:51:17
     */
    public List<Role> findEmployeeList(long roleId, String empId, String departmentId) throws Hl7Exception;


    /**
     * 根据工作组，职务/职称查询具体的员工集合，职务/职称为空查询本共组下的所有员工
     * 
     * @Title: findEmployeeByWGId
     * @param workGroupId
     *            工作组ID
     * @param dicCode
     *            职务/职称code编码
     * @return List 员工角色集合
     * @firstAuthor jinzw
     * @firstTime 2010-12-27下午01:51:17
     * @lastAuthor jinzw
     * @lastTime 2010-12-27下午10:51:17
     */
    public List findEmployeeByWGId(String workGroupId, String dicCode) throws Hl7Exception;


    /**
     * 验证人员编号是否存在，存在返回true,不存在返回false
     * 
     * @Title: validateExsit
     * @param employId
     *            员工id
     * @return ResultsDTO
     * @firstAuthor obama
     * @firstTime 2011-04-13 13:51:17
     * @lastAuthor obama
     * @lastTime 2011-04-13 13:51:17
     */
    public List<Employee> validateExsit(String employId) throws Hl7Exception;


    /**
     * 根据员工编号准确查出单个员工
     * 
     * @param empCode
     * @return
     */
    Employee findEmployeeByCode(String empCode);
}
